package com.aioz.common;

import lombok.Data;

@Data
public class Result {

    private String msg;

    private int code;

    private Object object;

    public Result ok(Object o,String msg){
        Result result = new Result();
        result.setCode(200);
        result.setObject(o);
        result.setMsg(msg);
        return result;
    }

    public Result error(String msg){
        Result result = new Result();
        result.setCode(409);
        result.setMsg(msg);
        return result;
    }
}
